package lab02.Test11;

/**
 * Created by Culle on 2017-10-24.
 */
public class Square extends Rectangle {
    double c;

    Square (double width,double height){
    }
    public double getDiagonal(){
        c=Math.sqrt(width*width+height*height);
        return  c;
    }

    @Override
    public  void printMyWay(){
        System.out.println("面积:"+getArea());
        System.out.println("周长:"+getAroundLong());
        System.out.println("对角线:"+getDiagonal());          }

}
